<?php

// +----------------------------------------------------------------------
// | H1CMS © OpenSource CMS
// +----------------------------------------------------------------------
// | Copyright (c) 2014-2016 http://www.h1cms.com All rights reserved.
// | Copyright (c) 2014-2016 嘉兴领格信息技术有限公司，并保留所有权利。
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: Allen <allen@lg4.cn>
// +----------------------------------------------------------------------

namespace h1cms\system;

/**
 * Description of Screen
 *
 * @author Allen <allen@lg4.cn>
 */
class Screen {

    public $title;
    public $subject = 'Control panel';
    public $description;
    public $keywords;
    public $breadcrumbs = [];
    public $menus = [];

    public function addBreadcrumb($label, $link, $class = '', $active = false) {
        $this->breadcrumbs[] = [
            'label' => $label,
            'link' => $link,
            'class' => $class,
            'active' => $active
        ];
        return $this;
    }

    public function addMenu($menu) {
        $this->menus[] = $menu;
        return $this;
    }

    public function setTitle($title, $subject = 'Control panel') {
        $this->title = $title;
        $this->subject = $subject;
        return $this;
    }

}
